<include file="Public/base"/>
<!-- 左侧菜单新增和编辑页面 -->
<script type="text/javascript" src="__STATIC__/ztree/js/jquery-1.4.4.min.js"></script>


<div class="pd-20">
    <form action="" method="POST" class="form form-horizontal" enctype="multipart/form-data"
          id="editGroupForm">
        <div class="row cl">
            <label for="auth-title" class="form-label col-3">菜单所属分类</label>
							
            <div class="formControls col-5">
				<select id="auth-title" type="text" name="pid" class="input-text" value="{$auth_group.title}" 
										required>
				    <option value="0"  >
					    <?php echo "新增顶级菜单";?>
					</option>                 
				    <volist name="twoData" id="vo"  >
				    	
					   <option value="{$vo.key}"  >
					    <?php echo str_pad("",$vo['deep']*3, "-",STR_PAD_RIGHT); ?>
					    		{$vo.title}
					   </option>
					</volist>
				    
				
				</select>
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">菜单名称</label>

            <div class="formControls col-5">
                <input  name="title" class='input-text' maxlength="200" />
            	
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">排序</label>

            <div class="formControls col-5">
                <input  name="sort" class='input-text' maxlength="200" />
            	
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">url</label>

            <div class="formControls col-5">
                <input  name="url" class='input-text' maxlength="200" />
            	
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">是否隐藏</label>

            <div class="formControls col-5">
                <select name="hide" id=""  class="input-text">
                	<option value="0" selected>显示</option>
                	<option value='1'>隐藏</option>
                </select>
            	
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">提示</label>

            <div class="formControls col-5">
                <input  name="tip" class='input-text' maxlength="200" />
            	
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">key名称（大写）</label>

            <div class="formControls col-5">
                <input  name="tip" class='input-text' maxlength="200" />
            	
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3">type</label>

            <div class="formControls col-5">
                <select name="type"  class="input-text" id="">
                	<option value="1" selected>菜单</option>
                	<option value='2'>操作</option>
                </select>
            	
            </div>
            <div class="col-4"></div>
        </div>
        <!--排序默认顶级值为0，二级为1-->
        <input type="hidden" id="check" value="<?php $str = $Think.ADMIN_PATH_NAME.$actions['COLUMNCHECK']['url'];echo U($str,array('key'=>$actions['COLUMNCHECK']['key']))?>"  />
               	
        <script>
        	$(function(){
        		$("#auth-title").change(function(){
        			var id=$(this).val();
        			$("input[name=sort]").remove();
        			//发异步到服务器--进行判断column_pid
        			var html='';
					$.ajax({
						type:"get",
						url:$("#check").val(),
						data:{column_id:id},
						success:function(data){
							html+='<input type="hidden" name="sort" value="'+data.sort+'" />';
							$("#logo").append(html);
						}
					});
        		})
        	})
        </script>
       
        <div class="row cl">
            <div class="col-9 col-offset-3">
                <input class="btn btn-primary radius" type="submit" value="确定">
                <button class="btn btn-warning radius" onclick="history.back(-1);return false;">返 回</button>

            </div>
        </div>
    </form>
</div>
<script type="application/javascript" src="__JS__/Employee/auth.js"></script>
